﻿@namespace MudBlazor.UnitTests.TestComponents

<MudChipSet @bind-SelectedChips="selected" MultiSelection="@MultiSelection" Filter="filter">
    <MudChip Text="Milk"></MudChip>
    <MudChip Text="Eggs" Default="true"></MudChip>
    <MudChip Text="Soap"></MudChip>
    <MudChip Text="Corn flakes"></MudChip>
    <MudChip Text="Salad" Default="true"></MudChip>
    <MudChip Text="Apples"></MudChip>
    <MudChip Text="Red wine"></MudChip>
</MudChipSet>


@if (selected != null && selected.Length>0)
{
    <MudText>@string.Join(", ", selected.Select(chip=>chip.Text).OrderBy(x => x))</MudText>
}
else
{
    <MudText>Nothing selected.</MudText>
}
<MudCheckBox @bind-Checked="filter">Filter</MudCheckBox>
@code
{
    [Parameter] public bool MultiSelection { get; set; }
    bool filter = false;
    MudChip[] selected;
}